<template>
		<u--image v-if='src' :showLoading="true" :src="targetSrc"  :width="width*2+'rpx'" :height="height*2+'rpx'"  :mode='mode'
			:shape='shape' :lazy-load="lazyLoad" :radius='radius' @load="$emit('load',$event)">
			 
		</u--image>
</template>

<script>
	export default {
		name: "w-image",
		props: {
			isLoc:{
				type:Boolean,
				default:false
			},
			preview:{
				type:Boolean,
			},
			src: {
				type: String,
				default: null
			},
			width: {
				type: [Number, String],
			},
			height: {
				type: [Number, String],
			},
			mode: {
				type: String,
				default: "aspectFill"
			},
			shape: {
				type: String,
				default: "square"
			},
			lazyLoad: {
				type: Boolean,
				default: true
			},
			radius:{
				type: [String,Number],
				default: "0"
			},
			
		},
		computed:{
			targetSrc(){
				if(this.src.startsWith('http') || this.isLoc) return this.src;
				return this.$ossUrl+this.src
			}
		},
		data() {
			return {

			};
		},
		methods:{
			
		}
	}
</script>

<style lang="scss">

</style>
